<html> 
    <head>
        <title>个人简历</title>
        
    </head>


    <body >
        <form>
        <table align="center">
            <tr><td colspan="5">个人简历</td></tr>
            <tr >
                <td>姓名:</td><td>李祥</td>
            </tr>
            <tr>
                <td >年龄:</td><td> 18 </td>
            </tr>
            <tr>
                <td>性别:</td>
                <td>
                    <input type="radio" name="sex" checked="checked"/>男
                    <input type="radio" name="sex" />女
                </td> 
            </tr>
            <tr>
                <td>个人简历</td>
                <td>
                    <input type="text" placeholder="请输入内容" id="text">
                </td>
            </tr>
            
        </table>
        <p align="center"><input type="submit" value="提交" id="3" >
            <input type="reset" value="重置"></p>
        </form>
        <script type="text/javascript">
            var btn=document.getElementById("3");
            btn.onmouseup=function(){
                var inputText = document.getElementById("text").value;
                if(inputText==="")
                    alert("请输入内容");
                else
                    alert("提交成功");
            }
            var btn = document.getElementById("text");

            btn.onmouseout = function () {
            var inputText = document.getElementById("text").value;
            if (inputText.length < 8) {
                alert('至少需要8个字符');
                }
            };
        </script>
    </body>

</html>